package com.sumainfor.pc.epc.feign.Zfeign;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.epc.fallback.ZfallBack.ZuulFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 调用网关服务
 */
@FeignClient(name = "tANGNEST-ZUUl", fallback = ZuulFeignFallback.class)
public interface ZzuulFeign {
    /**
     * 租后主管查询报修人的信息
     */
    @PostMapping("provider/Zfeign/getRepairUserList")
    JsonResult getRepairUserList(@RequestBody Map<String, Object> params);

    /**
     * 维修师傅查询管家报修人编号
     */
    @PostMapping("provider/Zfeign/getRuserList")
    JsonResult getRuserList(@RequestBody Map<String, Object> params);

    /**
     * 功能描述:
     * 创建消息
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/4/10 17:09
     */
    @PostMapping("/provider/message/AddMessage")
    JsonResult AddMessage(@RequestBody Map<String, Object> params);


    /**
     * <p>
     * 查询系统消息
     * </p>
     *
     * @author: zhoucong
     * @since:
     */
    @PostMapping("provider/message/getMessageList")
    JsonResult getMessageList(@RequestParam Map<String, Object> params,
                              @RequestParam("Pager") Pager pager
    );


    /**
     * <p>
     * 查询维修师傅的名字
     * </p>
     *
     * @author: zhoucong
     * @since:
     */
    @PostMapping("provider/sysUserList/getLoginName")
    JsonResult getLoginName(@RequestBody Map<String, Object> params);

    /**
     * 获取这个部门的所属公司信息
     *
     * @param deptId
     * @return
     */
    @PostMapping("/provider/getAreaInfoForGSByDeptId")
    JsonResult getAreaInfoForGSByDeptId(@RequestParam("deptId") String deptId);

    /**
     * 功能描述:
     * 获取所有用户的编号和名称
     *
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/5/9 11:58
     */
    @GetMapping("/provider/user/getAllUserIdAndName")
    JsonResult getAllUserIdAndName();

    /**
     *
     */
    @PostMapping("provider/Zfeign/getRepairOuserList")
    JsonResult getRepairOuserList(@RequestBody Map<String, Object> params);


    /**
     * 获取服务中心 部门数据通过ID
     *
     * @param deptId
     * @return
     */
    @PostMapping("/provider/getDeptInfoById")
    Map<String, Object> getDeptInfoById(@RequestParam("deptId") String deptId);

    /**
     * 获取所有的维修师傅角色的用户信息
     *
     * @param name 关键字查询
     * @return
     */
    @PostMapping("/provider/selectRepairPeople")
    List<Map<String, Object>> selectRepairPeople(@RequestParam("name") String name);

    /**
     * 根据用户姓名模糊查询用户信息
     *
     * @param username
     * @return
     */
    @PostMapping("/provider/searchUserForName")
    JsonResult searchUserForName(@RequestParam("username") String username);


    /**
     * 根据服务中心集合获取服务中心
     * @author zhoucong
     * @data 2019/9/3
     * @Param
     * @return
     */
    @PostMapping("/provider/epcHousing/getDeptNameByDeptId")
    JsonResult getDeptNameByDeptId(@RequestBody Map<String,Object> params);

    /**
     * 根据用户编号集合获取用户
     * @author zhoucong
     * @data 2019/9/3
     * @Param
     * @return
     */
    @PostMapping("/provider/epcHousing/getLoginNameList")
    JsonResult getLoginNameList(@RequestBody Map<String,Object> params);

}
